﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Bzure.Apps.Security.Controllers
{
    public class SecurityAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "SecurityApp";
            }
        }
        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute("SecurityApp_Droit", "Apps/SecurityApp/Droit/{action}/{id}", new { controller = "Droit", action = "Index", id = UrlParameter.Optional });
            context.MapRoute("SecurityApp_Role", "Apps/SecurityApp/Role/{action}/{id}", new { controller = "Role", action = "Index", id = UrlParameter.Optional });
            context.MapRoute("SecurityApp_User", "Apps/SecurityApp/User/{action}/{id}", new { controller = "User", action = "Index", id = UrlParameter.Optional });
            context.MapRoute("SecurityApp_Login", "Apps/SecurityApp/Account/{action}.html", new { controller = "Account", action = "LogOn" });
            context.MapRoute(
                "SecurityApp_default",
                "Apps/SecurityApp/{controller}/{action}/{id}",
                new { controller = "SAPublic", action = "Index", id = UrlParameter.Optional }
            );
        }
    }
}